//
// Created by Administrator on 2023/8/7.
//
#include <vector>
#include <string>
#include <iostream>

using namespace std;

class Solution {
public:
    void reverseString(vector<char> &s) {
        // 将 s 倒序
        int len = s.size();
        for (int i = 0; i < len / 2; i++) {
            char temp = s[i];
            s[i] = s[len - 1 - i];
            s[len - 1 - i] = temp;
        }
    }
};

int main() {
    Solution s;
    vector<char> str{'h', 'e', 'l', 'l', 'o'};
    s.reverseString(str);
    for (auto i: str) {
        cout << i << " ";
    }
    cout << endl;
    return 0;
}